3.311 \(\int \frac{a+b \log (c x^n)}{x \sqrt{d-e x} \sqrt{d+e x}} \, dx\)

Optimal. Leaf size=301 \[ -\frac{b n \sqrt{1-\frac{e^2 x^2}{d^2}} \text{PolyLog}\left (2,-\frac{\sqrt{1-\frac{e^2 x^2}{d^2}}+1}{1-\sqrt{1-\frac{e^2 x^2}{d^2}}}\right )}{2 \sqrt{d-e x} \sqrt{d+e x}}-\frac{\sqrt{1-\frac{e^2 x^2}{d^2}} \tanh ^{-1}\left (\sqrt{1-\frac{e^2 x^2}{d^2}}\right ) \left (a+b \log \left (c x^n\right )\right )}{\sqrt{d-e x} \sqrt{d+e x}}+\frac{b n \sqrt{1-\frac{e^2 x^2}{d^2}} \tanh ^{-1}\left (\sqrt{1-\frac{e^2 x^2}{d^2}}\right )^2}{2 \sqrt{d-e x} \sqrt{d+e x}}-\frac{b n \sqrt{1-\frac{e^2 x^2}{d^2}} \log \left (\frac{2}{1-\sqrt{1-\frac{e^2 x^2}{d^2}}}\right ) \tanh ^{-1}\left (\sqrt{1-\frac{e^2 x^2}{d^2}}\right )}{\sqrt{d-e x} \sqrt{d+e x}} \]

[Out]

(b*n*Sqrt[1 - (e^2*x^2)/d^2]*ArcTanh[Sqrt[1 - (e^2*x^2)/d^2]]^2)/(2*Sqrt[d - e*x]*Sqrt[d + e*x]) - (Sqrt[1 - (
e^2*x^2)/d^2]*ArcTanh[Sqrt[1 - (e^2*x^2)/d^2]]*(a + b*Log[c*x^n]))/(Sqrt[d - e*x]*Sqrt[d + e*x]) - (b*n*Sqrt[1
 - (e^2*x^2)/d^2]*ArcTanh[Sqrt[1 - (e^2*x^2)/d^2]]*Log[2/(1 - Sqrt[1 - (e^2*x^2)/d^2])])/(Sqrt[d - e*x]*Sqrt[d
 + e*x]) - (b*n*Sqrt[1 - (e^2*x^2)/d^2]*PolyLog[2, -((1 + Sqrt[1 - (e^2*x^2)/d^2])/(1 - Sqrt[1 - (e^2*x^2)/d^2
]))])/(2*Sqrt[d - e*x]*Sqrt[d + e*x])

________________________________________________________________________________________

Rubi [A]  time = 0.604864, antiderivative size = 301, normalized size of antiderivative = 1., number of steps used = 8, number of rules used = 9, integrand size = 33, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.273, Rules used = {2342, 266, 63, 208, 2348, 5984, 5918, 2402, 2315} \[ -\frac{b n \sqrt{1-\frac{e^2 x^2}{d^2}} \text{PolyLog}\left (2,-\frac{\sqrt{1-\frac{e^2 x^2}{d^2}}+1}{1-\sqrt{1-\frac{e^2 x^2}{d^2}}}\right )}{2 \sqrt{d-e x} \sqrt{d+e x}}-\frac{\sqrt{1-\frac{e^2 x^2}{d^2}} \tanh ^{-1}\left (\sqrt{1-\frac{e^2 x^2}{d^2}}\right ) \left (a+b \log \left (c x^n\right )\right )}{\sqrt{d-e x} \sqrt{d+e x}}+\frac{b n \sqrt{1-\frac{e^2 x^2}{d^2}} \tanh ^{-1}\left (\sqrt{1-\frac{e^2 x^2}{d^2}}\right )^2}{2 \sqrt{d-e x} \sqrt{d+e x}}-\frac{b n \sqrt{1-\frac{e^2 x^2}{d^2}} \log \left (\frac{2}{1-\sqrt{1-\frac{e^2 x^2}{d^2}}}\right ) \tanh ^{-1}\left (\sqrt{1-\frac{e^2 x^2}{d^2}}\right )}{\sqrt{d-e x} \sqrt{d+e x}} \]

Antiderivative was successfully verified.

[In]

Int[(a + b*Log[c*x^n])/(x*Sqrt[d - e*x]*Sqrt[d + e*x]),x]

[Out]

(b*n*Sqrt[1 - (e^2*x^2)/d^2]*ArcTanh[Sqrt[1 - (e^2*x^2)/d^2]]^2)/(2*Sqrt[d - e*x]*Sqrt[d + e*x]) - (Sqrt[1 - (
e^2*x^2)/d^2]*ArcTanh[Sqrt[1 - (e^2*x^2)/d^2]]*(a + b*Log[c*x^n]))/(Sqrt[d - e*x]*Sqrt[d + e*x]) - (b*n*Sqrt[1
 - (e^2*x^2)/d^2]*ArcTanh[Sqrt[1 - (e^2*x^2)/d^2]]*Log[2/(1 - Sqrt[1 - (e^2*x^2)/d^2])])/(Sqrt[d - e*x]*Sqrt[d
 + e*x]) - (b*n*Sqrt[1 - (e^2*x^2)/d^2]*PolyLog[2, -((1 + Sqrt[1 - (e^2*x^2)/d^2])/(1 - Sqrt[1 - (e^2*x^2)/d^2
]))])/(2*Sqrt[d - e*x]*Sqrt[d + e*x])

Rule 2342

Int[((a_.) + Log[(c_.)*(x_)^(n_.)]*(b_.))*(x_)^(m_.)*((d1_) + (e1_.)*(x_))^(q_)*((d2_) + (e2_.)*(x_))^(q_), x_
Symbol] :> Dist[((d1 + e1*x)^q*(d2 + e2*x)^q)/(1 + (e1*e2*x^2)/(d1*d2))^q, Int[x^m*(1 + (e1*e2*x^2)/(d1*d2))^q
*(a + b*Log[c*x^n]), x], x] /; FreeQ[{a, b, c, d1, e1, d2, e2, n}, x] && EqQ[d2*e1 + d1*e2, 0] && IntegerQ[m]
&& IntegerQ[q - 1/2]

Rule 266

Int[(x_)^(m_.)*((a_) + (b_.)*(x_)^(n_))^(p_), x_Symbol] :> Dist[1/n, Subst[Int[x^(Simplify[(m + 1)/n] - 1)*(a
+ b*x)^p, x], x, x^n], x] /; FreeQ[{a, b, m, n, p}, x] && IntegerQ[Simplify[(m + 1)/n]]

Rule 63

Int[((a_.) + (b_.)*(x_))^(m_)*((c_.) + (d_.)*(x_))^(n_), x_Symbol] :> With[{p = Denominator[m]}, Dist[p/b, Sub
st[Int[x^(p*(m + 1) - 1)*(c - (a*d)/b + (d*x^p)/b)^n, x], x, (a + b*x)^(1/p)], x]] /; FreeQ[{a, b, c, d}, x] &
& NeQ[b*c - a*d, 0] && LtQ[-1, m, 0] && LeQ[-1, n, 0] && LeQ[Denominator[n], Denominator[m]] && IntLinearQ[a,
b, c, d, m, n, x]

Rule 208

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(Rt[-(a/b), 2]*ArcTanh[x/Rt[-(a/b), 2]])/a, x] /; FreeQ[{a,
b}, x] && NegQ[a/b]

Rule 2348

Int[(((a_.) + Log[(c_.)*(x_)^(n_.)]*(b_.))*((d_) + (e_.)*(x_)^(r_.))^(q_.))/(x_), x_Symbol] :> With[{u = IntHi
de[(d + e*x^r)^q/x, x]}, Simp[u*(a + b*Log[c*x^n]), x] - Dist[b*n, Int[Dist[1/x, u, x], x], x]] /; FreeQ[{a, b
, c, d, e, n, r}, x] && IntegerQ[q - 1/2]

Rule 5984

Int[(((a_.) + ArcTanh[(c_.)*(x_)]*(b_.))^(p_.)*(x_))/((d_) + (e_.)*(x_)^2), x_Symbol] :> Simp[(a + b*ArcTanh[c
*x])^(p + 1)/(b*e*(p + 1)), x] + Dist[1/(c*d), Int[(a + b*ArcTanh[c*x])^p/(1 - c*x), x], x] /; FreeQ[{a, b, c,
 d, e}, x] && EqQ[c^2*d + e, 0] && IGtQ[p, 0]

Rule 5918

Int[((a_.) + ArcTanh[(c_.)*(x_)]*(b_.))^(p_.)/((d_) + (e_.)*(x_)), x_Symbol] :> -Simp[((a + b*ArcTanh[c*x])^p*
Log[2/(1 + (e*x)/d)])/e, x] + Dist[(b*c*p)/e, Int[((a + b*ArcTanh[c*x])^(p - 1)*Log[2/(1 + (e*x)/d)])/(1 - c^2
*x^2), x], x] /; FreeQ[{a, b, c, d, e}, x] && IGtQ[p, 0] && EqQ[c^2*d^2 - e^2, 0]

Rule 2402

Int[Log[(c_.)/((d_) + (e_.)*(x_))]/((f_) + (g_.)*(x_)^2), x_Symbol] :> -Dist[e/g, Subst[Int[Log[2*d*x]/(1 - 2*
d*x), x], x, 1/(d + e*x)], x] /; FreeQ[{c, d, e, f, g}, x] && EqQ[c, 2*d] && EqQ[e^2*f + d^2*g, 0]

Rule 2315

Int[Log[(c_.)*(x_)]/((d_) + (e_.)*(x_)), x_Symbol] :> -Simp[PolyLog[2, 1 - c*x]/e, x] /; FreeQ[{c, d, e}, x] &
& EqQ[e + c*d, 0]

Rubi steps

\begin{align*} \int \frac{a+b \log \left (c x^n\right )}{x \sqrt{d-e x} \sqrt{d+e x}} \, dx &=\frac{\sqrt{1-\frac{e^2 x^2}{d^2}} \int \frac{a+b \log \left (c x^n\right )}{x \sqrt{1-\frac{e^2 x^2}{d^2}}} \, dx}{\sqrt{d-e x} \sqrt{d+e x}}\\ &=-\frac{\sqrt{1-\frac{e^2 x^2}{d^2}} \tanh ^{-1}\left (\sqrt{1-\frac{e^2 x^2}{d^2}}\right ) \left (a+b \log \left (c x^n\right )\right )}{\sqrt{d-e x} \sqrt{d+e x}}+\frac{\left (b n \sqrt{1-\frac{e^2 x^2}{d^2}}\right ) \int \frac{\tanh ^{-1}\left (\sqrt{1-\frac{e^2 x^2}{d^2}}\right )}{x} \, dx}{\sqrt{d-e x} \sqrt{d+e x}}\\ &=-\frac{\sqrt{1-\frac{e^2 x^2}{d^2}} \tanh ^{-1}\left (\sqrt{1-\frac{e^2 x^2}{d^2}}\right ) \left (a+b \log \left (c x^n\right )\right )}{\sqrt{d-e x} \sqrt{d+e x}}+\frac{\left (b n \sqrt{1-\frac{e^2 x^2}{d^2}}\right ) \operatorname{Subst}\left (\int \frac{\tanh ^{-1}\left (\sqrt{1-\frac{e^2 x}{d^2}}\right )}{x} \, dx,x,x^2\right )}{2 \sqrt{d-e x} \sqrt{d+e x}}\\ &=-\frac{\sqrt{1-\frac{e^2 x^2}{d^2}} \tanh ^{-1}\left (\sqrt{1-\frac{e^2 x^2}{d^2}}\right ) \left (a+b \log \left (c x^n\right )\right )}{\sqrt{d-e x} \sqrt{d+e x}}+\frac{\left (b n \sqrt{1-\frac{e^2 x^2}{d^2}}\right ) \operatorname{Subst}\left (\int \frac{x \tanh ^{-1}(x)}{-1+x^2} \, dx,x,\sqrt{1-\frac{e^2 x^2}{d^2}}\right )}{\sqrt{d-e x} \sqrt{d+e x}}\\ &=\frac{b n \sqrt{1-\frac{e^2 x^2}{d^2}} \tanh ^{-1}\left (\sqrt{1-\frac{e^2 x^2}{d^2}}\right )^2}{2 \sqrt{d-e x} \sqrt{d+e x}}-\frac{\sqrt{1-\frac{e^2 x^2}{d^2}} \tanh ^{-1}\left (\sqrt{1-\frac{e^2 x^2}{d^2}}\right ) \left (a+b \log \left (c x^n\right )\right )}{\sqrt{d-e x} \sqrt{d+e x}}-\frac{\left (b n \sqrt{1-\frac{e^2 x^2}{d^2}}\right ) \operatorname{Subst}\left (\int \frac{\tanh ^{-1}(x)}{1-x} \, dx,x,\sqrt{1-\frac{e^2 x^2}{d^2}}\right )}{\sqrt{d-e x} \sqrt{d+e x}}\\ &=\frac{b n \sqrt{1-\frac{e^2 x^2}{d^2}} \tanh ^{-1}\left (\sqrt{1-\frac{e^2 x^2}{d^2}}\right )^2}{2 \sqrt{d-e x} \sqrt{d+e x}}-\frac{\sqrt{1-\frac{e^2 x^2}{d^2}} \tanh ^{-1}\left (\sqrt{1-\frac{e^2 x^2}{d^2}}\right ) \left (a+b \log \left (c x^n\right )\right )}{\sqrt{d-e x} \sqrt{d+e x}}-\frac{b n \sqrt{1-\frac{e^2 x^2}{d^2}} \tanh ^{-1}\left (\sqrt{1-\frac{e^2 x^2}{d^2}}\right ) \log \left (\frac{2}{1-\sqrt{1-\frac{e^2 x^2}{d^2}}}\right )}{\sqrt{d-e x} \sqrt{d+e x}}+\frac{\left (b n \sqrt{1-\frac{e^2 x^2}{d^2}}\right ) \operatorname{Subst}\left (\int \frac{\log \left (\frac{2}{1-x}\right )}{1-x^2} \, dx,x,\sqrt{1-\frac{e^2 x^2}{d^2}}\right )}{\sqrt{d-e x} \sqrt{d+e x}}\\ &=\frac{b n \sqrt{1-\frac{e^2 x^2}{d^2}} \tanh ^{-1}\left (\sqrt{1-\frac{e^2 x^2}{d^2}}\right )^2}{2 \sqrt{d-e x} \sqrt{d+e x}}-\frac{\sqrt{1-\frac{e^2 x^2}{d^2}} \tanh ^{-1}\left (\sqrt{1-\frac{e^2 x^2}{d^2}}\right ) \left (a+b \log \left (c x^n\right )\right )}{\sqrt{d-e x} \sqrt{d+e x}}-\frac{b n \sqrt{1-\frac{e^2 x^2}{d^2}} \tanh ^{-1}\left (\sqrt{1-\frac{e^2 x^2}{d^2}}\right ) \log \left (\frac{2}{1-\sqrt{1-\frac{e^2 x^2}{d^2}}}\right )}{\sqrt{d-e x} \sqrt{d+e x}}-\frac{\left (b n \sqrt{1-\frac{e^2 x^2}{d^2}}\right ) \operatorname{Subst}\left (\int \frac{\log (2 x)}{1-2 x} \, dx,x,\frac{1}{1-\sqrt{1-\frac{e^2 x^2}{d^2}}}\right )}{\sqrt{d-e x} \sqrt{d+e x}}\\ &=\frac{b n \sqrt{1-\frac{e^2 x^2}{d^2}} \tanh ^{-1}\left (\sqrt{1-\frac{e^2 x^2}{d^2}}\right )^2}{2 \sqrt{d-e x} \sqrt{d+e x}}-\frac{\sqrt{1-\frac{e^2 x^2}{d^2}} \tanh ^{-1}\left (\sqrt{1-\frac{e^2 x^2}{d^2}}\right ) \left (a+b \log \left (c x^n\right )\right )}{\sqrt{d-e x} \sqrt{d+e x}}-\frac{b n \sqrt{1-\frac{e^2 x^2}{d^2}} \tanh ^{-1}\left (\sqrt{1-\frac{e^2 x^2}{d^2}}\right ) \log \left (\frac{2}{1-\sqrt{1-\frac{e^2 x^2}{d^2}}}\right )}{\sqrt{d-e x} \sqrt{d+e x}}-\frac{b n \sqrt{1-\frac{e^2 x^2}{d^2}} \text{Li}_2\left (1-\frac{2}{1-\sqrt{1-\frac{e^2 x^2}{d^2}}}\right )}{2 \sqrt{d-e x} \sqrt{d+e x}}\\ \end{align*}

Mathematica [A]  time = 1.75835, size = 310, normalized size = 1.03 \[ \frac{b n \sqrt{e^2 x^2-d^2} \left (\frac{\sqrt{1-\frac{e^2 x^2}{d^2}} \left (-4 \text{PolyLog}\left (2,\frac{1}{2}-\frac{1}{2} \sqrt{1-\frac{e^2 x^2}{d^2}}\right )+\log ^2\left (\frac{e^2 x^2}{d^2}\right )+2 \log ^2\left (\frac{1}{2} \left (\sqrt{1-\frac{e^2 x^2}{d^2}}+1\right )\right )-4 \log \left (\frac{1}{2} \left (\sqrt{1-\frac{e^2 x^2}{d^2}}+1\right )\right ) \log \left (\frac{e^2 x^2}{d^2}\right )\right )}{\sqrt{e^2 x^2-d^2}}-\frac{4 \left (2 \log (x)-\log \left (\frac{e^2 x^2}{d^2}\right )\right ) \tanh ^{-1}\left (\frac{\sqrt{e^2 x^2-d^2}}{\sqrt{-d^2}}\right )}{\sqrt{-d^2}}\right )}{8 \sqrt{d-e x} \sqrt{d+e x}}-\frac{\log \left (\sqrt{d-e x} \sqrt{d+e x}+d\right ) \left (a+b \log \left (c x^n\right )-b n \log (x)\right )}{d}+\frac{\log (x) \left (a+b \log \left (c x^n\right )-b n \log (x)\right )}{d} \]

Antiderivative was successfully verified.

[In]

Integrate[(a + b*Log[c*x^n])/(x*Sqrt[d - e*x]*Sqrt[d + e*x]),x]

[Out]

(Log[x]*(a - b*n*Log[x] + b*Log[c*x^n]))/d - ((a - b*n*Log[x] + b*Log[c*x^n])*Log[d + Sqrt[d - e*x]*Sqrt[d + e
*x]])/d + (b*n*Sqrt[-d^2 + e^2*x^2]*((-4*ArcTanh[Sqrt[-d^2 + e^2*x^2]/Sqrt[-d^2]]*(2*Log[x] - Log[(e^2*x^2)/d^
2]))/Sqrt[-d^2] + (Sqrt[1 - (e^2*x^2)/d^2]*(Log[(e^2*x^2)/d^2]^2 - 4*Log[(e^2*x^2)/d^2]*Log[(1 + Sqrt[1 - (e^2
*x^2)/d^2])/2] + 2*Log[(1 + Sqrt[1 - (e^2*x^2)/d^2])/2]^2 - 4*PolyLog[2, 1/2 - Sqrt[1 - (e^2*x^2)/d^2]/2]))/Sq
rt[-d^2 + e^2*x^2]))/(8*Sqrt[d - e*x]*Sqrt[d + e*x])

________________________________________________________________________________________

Maple [F]  time = 0.628, size = 0, normalized size = 0. \begin{align*} \int{\frac{a+b\ln \left ( c{x}^{n} \right ) }{x}{\frac{1}{\sqrt{-ex+d}}}{\frac{1}{\sqrt{ex+d}}}}\, dx \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((a+b*ln(c*x^n))/x/(-e*x+d)^(1/2)/(e*x+d)^(1/2),x)

[Out]

int((a+b*ln(c*x^n))/x/(-e*x+d)^(1/2)/(e*x+d)^(1/2),x)

________________________________________________________________________________________

Maxima [F(-2)]  time = 0., size = 0, normalized size = 0. \begin{align*} \text{Exception raised: ValueError} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*log(c*x^n))/x/(-e*x+d)^(1/2)/(e*x+d)^(1/2),x, algorithm="maxima")

[Out]

Exception raised: ValueError

________________________________________________________________________________________

Fricas [F]  time = 0., size = 0, normalized size = 0. \begin{align*}{\rm integral}\left (-\frac{\sqrt{e x + d} \sqrt{-e x + d} b \log \left (c x^{n}\right ) + \sqrt{e x + d} \sqrt{-e x + d} a}{e^{2} x^{3} - d^{2} x}, x\right ) \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*log(c*x^n))/x/(-e*x+d)^(1/2)/(e*x+d)^(1/2),x, algorithm="fricas")

[Out]

integral(-(sqrt(e*x + d)*sqrt(-e*x + d)*b*log(c*x^n) + sqrt(e*x + d)*sqrt(-e*x + d)*a)/(e^2*x^3 - d^2*x), x)

________________________________________________________________________________________

Sympy [F]  time = 0., size = 0, normalized size = 0. \begin{align*} \int \frac{a + b \log{\left (c x^{n} \right )}}{x \sqrt{d - e x} \sqrt{d + e x}}\, dx \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*ln(c*x**n))/x/(-e*x+d)**(1/2)/(e*x+d)**(1/2),x)

[Out]

Integral((a + b*log(c*x**n))/(x*sqrt(d - e*x)*sqrt(d + e*x)), x)

________________________________________________________________________________________

Giac [F]  time = 0., size = 0, normalized size = 0. \begin{align*} \int \frac{b \log \left (c x^{n}\right ) + a}{\sqrt{e x + d} \sqrt{-e x + d} x}\,{d x} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*log(c*x^n))/x/(-e*x+d)^(1/2)/(e*x+d)^(1/2),x, algorithm="giac")

[Out]

integrate((b*log(c*x^n) + a)/(sqrt(e*x + d)*sqrt(-e*x + d)*x), x)